package com.zxx.pattern.chainPattern.chain;

/**
 * @author zxx on 2021/1/25
 */
public class ConcreteHandler3 extends Handler {

    @Override
    public void handleMessage(int type) {
        if (type == 5 || type == 6) {
            System.out.println("ConcreteHandler3解决了问题");
        } else {
            System.out.println("ConcreteHandler3解决不了");
            if (nextHandler != null) {
                nextHandler.handleMessage(type);
            } else {
                System.out.println("没人处理3");
            }
        }
    }
}
